<!DOCTYPE html>
<html lang="en">
<?php
require_once('inc/weixiconfig.php');
require_once('globals.php');
?>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.5,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我们的专家</title>
    <link rel="stylesheet" href="static/css/main.css">
    <link href="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.css" rel="stylesheet">
</head>
<body>
    <div id="expertcon">
        <ul id="list"></ul>
        <script type="text/html" id="listTemp">
            {{each data as value i}}
                <li data-id = {{value.tbid}}>
                    <div class="top">
                        <div class="imgbox">
                            <img src="{{value.image}}" alt="" style="border-radius:50%;">
                        </div>
                        <span class="name">{{value.name}}</span>
                        <div class="go">马上预约</div>
                    </div>
                    <div class="limit">从业时间：{{value.work_begin_time}} 收费标准：{{value.price/100}}元/{{value.serve_period}}分钟</div>
                    <div class="con">
                        {{value.introduction}}
                    </div>
                </li>
            {{/each}}
        </script>
    </div>
</body>
</html>
<script src="http://cdn.bootcss.com/jquery/3.2.1/jquery.js"></script>
<script src="http://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>
<script src="js/aui-art-template-a880d14/lib/template-web.js" charset="utf-8"></script>
<?php
$wxjs=1;
$title='【屋童树的专家们】';
$desc='专业心理医生和咨询师为您健康心理保驾护航。';
$link='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$imagesurl='http://'.$_SERVER['HTTP_HOST'].'/static/img/sharelogo.jpg';
require_once('include.php');
?>
<script type="text/javascript">
    $().ready(function(){
        $.ajax({
    		type : "GET",
    		async:false,
    		url: 'http://www.familyandtree.com/getcontent.php?ac=expert_list',
    		dataType : "json",
    		success : function(data){
    			if (data.error != '') {
    				swal({
    					button: false,
    					title: data.error,
    				});
    				return false;
    			}else {
                    template.defaults.escape=false;
    				$('#list').append(template('listTemp',data));
    			}
    		},
    		error:function(data){
    			swal({
    				button: false,
    				title: data.error,
    			});
    		}
    	});

        $('li').click(function(){
            window.location.href="order_pro.php?id="+$(this).data('id')
        })
    })
</script>
